package com.wise.site.protocol.result;

import org.json.JSONException;
import org.json.JSONObject;

import com.wise.site.protocol.base.SoapItem;

public class CommentItem extends SoapItem {
	
	/**
	 * 评论者名称
	 */
	private String userName;
	
	/*
	 * 时间
	 */
	private String date;
	
	/*
	 * 评论内容
	 */
	private String content;
	
	public CommentItem() {
	}
	
	public CommentItem(JSONObject node) {
		try {
			parse(node);
		} catch (JSONException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void parse(JSONObject node) throws JSONException {
		this.userName = node.getString("username");
		this.date = node.getString("time");
		this.content = node.getString("content");
	}
	
//	private void test(){
//		this.userName = "张三";
//		this.date = "2012-9-24";
//		this.content = "评论内容评论内容评论内容评论内容评论内容";
//	}

//	public int getId() {
//		return id;
//	}
//
//	public void setId(int id) {
//		this.id = id;
//	}
//
//	public int getDetailId() {
//		return detailId;
//	}
//
//	public void setDetailId(int detailId) {
//		this.detailId = detailId;
//	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Override
	public String toString() {
		return "CommentItem [userName=" + userName + ", date=" + date + ", content="
				+ content + "]";
	}
	
	

}
